package io.sdl.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import io.sdl.entity.SdlDiaryCommentsEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 日记评论表
 * 
 * @author Dchen
 * @email 1211734836@qq.com
 * @date 2025-04-25 14:09:19
 */
@Mapper
public interface SdlDiaryCommentsDao extends BaseMapper<SdlDiaryCommentsEntity> {

	//获取动态下的一级评论
	List<SdlDiaryCommentsEntity> selectByDiaryId(@Param("diaryId")Long diaryId);

	//根据评论id查询下面的子评论
	List<SdlDiaryCommentsEntity> selectByPid(@Param("parentId")Long parentId);
}
